package com.ossjk.qlh.minapp.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ossjk.core.base.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 订单
 *
 * @author parker
 * @since 2020-08-14
 */
@ApiModel(value = "订单")
public class Orders extends BaseEntity<Orders> {

    private static final long serialVersionUID = 1L;

    /**
     * 成员ID
     */
    @ApiModelProperty(value = "成员ID")
    @TableField("mid")
    private String mid;
    /**
     * 单号：200810100010
     * V/S+单号
     */
    @ApiModelProperty(value = "单号：200810100010V/S+单号")
    @TableField("code")
    private String code;
    /**
     * 接单时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JSONField(format = "yyyy-MM-dd")
    @ApiModelProperty(value = "接单时间")
    @TableField("jdtm")
    private Date jdtm;

    /**
     * 下单时段： 1-午餐、2-晚餐
     */
    @ApiModelProperty(value = "下单时段： 1-午餐、2-晚餐")
    @TableField("type")
    private Integer type;
    /**
     * 电话
     */
    @ApiModelProperty(value = "电话")
    @TableField("phone")
    private String phone;
    /**
     * 企业id
     */
    @ApiModelProperty(value = "企业id")
    @TableField("eid")
    private String eid;
    /**
     * 状态：1待接单，2，已接单，3，已配送，4，已拒单
     */
    @ApiModelProperty(value = "状态：1待接单，2，已接单，3，已配送，4，已拒单")
    @TableField("state")
    private Integer state;
    /**
     * 配送方式:达达、美团、自配送
     */
    @ApiModelProperty(value = "配送方式:达达、美团、自配送")
    @TableField("sendway")
    private String sendway;
    /**
     * 配送时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JSONField(format = "yyyy-MM-dd")
    @ApiModelProperty(value = "配送时间")
    @TableField("sendtm")
    private Date sendtm;
    /**
     * 公司地址
     */
    @ApiModelProperty(value = "公司地址")
    @TableField("eaddrs")
    private String eaddrs;
    /**
     * 员工地址
     */
    @ApiModelProperty(value = "员工地址")
    @TableField("maddrs")
    private String maddrs;
    /**
     * 金额
     */
    @ApiModelProperty(value = "金额")
    @TableField("cost")
    private BigDecimal cost;

    /**
     * 额定配送费
     */
    @ApiModelProperty(value = "额定配送费")
    @TableField("sendcost")
    private BigDecimal sendcost;

    /**
     * 实际配送费
     */
    @ApiModelProperty(value = "实际配送费")
    @TableField("sendact")
    private BigDecimal sendact;


    /**
     * 订单项[订单项id]
     */
    @ApiModelProperty(value = "订单项[订单项id]")
    @TableField("exptxt")
    private String exptxt;
    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    @TableField("remark")
    private String remark;

    public String getMid() {
        return mid;
    }

    public void setMid(String mid) {
        this.mid = mid;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Date getJdtm() {
        return jdtm;
    }

    public void setJdtm(Date jdtm) {
        this.jdtm = jdtm;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEid() {
        return eid;
    }

    public void setEid(String eid) {
        this.eid = eid;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public String getSendway() {
        return sendway;
    }

    public void setSendway(String sendway) {
        this.sendway = sendway;
    }

    public Date getSendtm() {
        return sendtm;
    }

    public void setSendtm(Date sendtm) {
        this.sendtm = sendtm;
    }

    public String getEaddrs() {
        return eaddrs;
    }

    public void setEaddrs(String eaddrs) {
        this.eaddrs = eaddrs;
    }

    public String getMaddrs() {
        return maddrs;
    }

    public void setMaddrs(String maddrs) {
        this.maddrs = maddrs;
    }

    public BigDecimal getCost() {
        return cost;
    }

    public void setCost(BigDecimal cost) {
        this.cost = cost;
    }

    public String getExptxt() {
        return exptxt;
    }

    public void setExptxt(String exptxt) {
        this.exptxt = exptxt;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public BigDecimal getSendcost() {
        return sendcost;
    }

    public void setSendcost(BigDecimal sendcost) {
        this.sendcost = sendcost;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public BigDecimal getSendact() {
        return sendact;
    }

    public void setSendact(BigDecimal sendact) {
        this.sendact = sendact;
    }

    @Override
    public String toString() {
        return "Orders{" +
                "mid='" + mid + '\'' +
                ", code='" + code + '\'' +
                ", jdtm=" + jdtm +
                ", type=" + type +
                ", phone='" + phone + '\'' +
                ", eid='" + eid + '\'' +
                ", state=" + state +
                ", sendway='" + sendway + '\'' +
                ", sendtm=" + sendtm +
                ", eaddrs='" + eaddrs + '\'' +
                ", maddrs='" + maddrs + '\'' +
                ", cost=" + cost +
                ", sendcost=" + sendcost +
                ", exptxt='" + exptxt + '\'' +
                ", remark='" + remark + '\'' +
                '}';
    }
}
